{% extends "layout.html" %}

{% block content %}
    <div class="card-header">
        <a class="btn btn-outline-primary btn-sm" href="/depart/add/" role="button">新建部门</a>
    </div>
    <div class="container">
        <table class="table table-hover container">
            <thead>
            <tr>
                <th scope="col">ID</th>
                <th scope="col">部门</th>
                <th scope="col">操作</th>
            </tr>
            </thead>
            <tbody>
            {% for item in data %}
                <tr>
                    <th>{{ item.id }}</th>
                    <td>{{ item.title }}</td>
                    <td>
                        <a class="btn btn-primary btn-sm" href="/depart/update/?id={{ item.id }}" role="button">修改</a>
                        <a class="btn btn-danger btn-sm" href="/depart/delete/?id={{ item.id }}" role="button">删除</a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>

{% endblock %}




